package com.qf.lanzhou.blog.api.service.impl;

import com.qf.lanzhou.blog.api.dao.ArticleTypeDao;
import com.qf.lanzhou.blog.api.dao.Impl.ArtivleTypeDaolmpl;
import com.qf.lanzhou.blog.api.pojo.entity.Article;
import com.qf.lanzhou.blog.api.pojo.entity.Page;
import com.qf.lanzhou.blog.api.service.ArtivleTypeService;

import java.util.List;

/**
 * @author jack
 */
public class ArtivleTypeServicelmpl implements ArtivleTypeService {
    ArticleTypeDao articleTypeDao = new ArtivleTypeDaolmpl();
    @Override
    public List<Article> selectPageByType(Long i, Integer integer) {
        Page page = new Page(integer);
        List list = articleTypeDao.secletByType(i, page);
        return list;
    }

    @Override
    public Integer getTypeCount(Long l) {
        Long aLong = articleTypeDao.selectTypeCount(l);
        String s = Long.toString(aLong);
        Integer decode = Integer.decode(s);
        return decode;
    }
}
